Add VECTOR and BSON data types support#16
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 64c0676. Configure here.
| valueBytes.CopyTo(bytes, i * sizeof(double)); | ||
| } | ||
| return bytes; | ||
| } |
There was a problem hiding this comment.
Big-endian double conversion missing NET5 optimization path
Low Severity
ConvertDoublesToBytes uses the BitConverter.GetBytes/Array.Reverse fallback on big-endian platforms, but ConvertFloatsToBytes (and the corresponding VectorFloat64ColumnReader) both use BinaryPrimitives.WriteDoubleLittleEndian/ReadDoubleLittleEndian under #if NET5_0_OR_GREATER. The double converter is functionally correct but inconsistent with every other conversion method in the PR.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 64c0676. Configure here.


Note
Medium Risk
Touches core protocol metadata parsing, row/parameter serialization, and session initialization, so mis-parsing or incorrect byte conversions could affect query correctness and bulk load behavior for affected columns.
Overview
Adds opt-in support for SingleStore extended data types BSON and VECTOR by introducing
SingleStoreExtendedTypeCodemetadata inColumnDefinitionPayloadand routing reads through new vector-awareColumnReaderimplementations.Extends type mapping/schema and parameter handling: adds
SingleStoreDbType.Bson/Vector, surfaces VECTOR dimensions/element type onSingleStoreDbColumn, serializes VECTOR/BSON values via newSingleStoreBinaryValueConverter, and updatesSingleStoreBulkCopyto load these types usingUNHEX(@var):>BSON/:>VECTOR(dims, type)expressions.Adds a new connection-string option
EnableExtendedDataTypesthat, when enabled, executesSET SESSION enable_extended_types_metadata = TRUEon open (and re-applies it on connection reset) with a server-version guard (>= 8.5.28).Reviewed by Cursor Bugbot for commit 64c0676. Bugbot is set up for automated code reviews on this repo. Configure here.